#ifndef _COMPONENT_H
#define _COMPONENT_H

#include "TGObject.h"

namespace TG
{
	enum LIFT
	{
		CREATE,
		ENABLE,
		START,
		UPDATE,
		DISABLE,
		DESTROY,
	};

	class Component
	{
	public:
		TGObject* gameObject;
		bool enable;
		LIFT life;
		bool isFirstStart;

		Component();
		virtual ~Component();

		virtual void onCreate();

		virtual void onEnable();

		virtual void onStart();

		virtual void update();

		virtual void onDisable();

		virtual void onDestroy();

		void setEnable(bool b);
	};

	class ScriptComponent : Component
	{
	};

	class GameMain : ScriptComponent
	{

	};
}
#endif